<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
	//切换栏目方式
	function parseCateType(e){
		if($(e).val()==1){
			$('#pagesize').show();
		}else{
			$('#pagesize').hide();
		}
	}
	function after(e){
	    $(e).parent().parent().parent().parent().parent('li').after($(e).parent().parent().parent().parent().parent('li').prev());
    }
    function append(e){
	    $(e).parent().parent().parent().parent().parent('li').next().after($(e).parent().parent().parent().parent().parent('li'));
    }
	function delnews(e){
		$(e).parent().parent().parent().parent().parent().remove();
	}
	function addnews(){
		var html = $('#copyHTML').html();
		$(html).appendTo('#replyList ul');
	}
	
	
	function getExtends(e){
		var v = $('#extendsList'+$(e).val()).val();
		$('#extends').val(v);
	}
	
	function relateids(){
				art.dialog.data('relateidsBox',$('#relateids'));
				
				
				art.dialog.open('{:U('selectProduct', array('product_id' => $info['id']))}', {width: 800, height: 500,lock:true,title:'选择关联商品', ok:function(){
					var d = this.iframe.contentWindow.document;
					
			    }});
			}
	
  </script>
  <style>
  	#replyList ul li{margin-top:5px; background:#eee; padding:8px; width:700px;}
	.delnews{display:block; width:30px; font-size:20px; height:30px; border-radius:15px; background:#f00; color:#fff; line-height:30px; text-align:center;}
  </style>

 <div class="h"><a href="{:U('index')}" class="btn btn-info"><i class="glyphicon glyphicon-circle-arrow-left"></i> 返回砍价活动列表</a>
 
 </div>
    <form class="checkoutform form-horizontal" action="{:U('update')}" method="post">
    
    
    
    
    
    
    
    
    

    
     
    
    
    
    
    
    
    
    
      <div class="table_ container">
      
  
      <input type="hidden" name="id" value="{$info.id}">
  
     <div class="form-group">
      <label class="col-sm-2 control-label">活动名称</label>
      <div class="col-sm-10">
        <input class="form-control" name="name" value="{$info.name}" type="text" placeholder="活动名称">
      </div>
   </div>
      <div class="form-group">
      <label class="col-sm-2 control-label">活动简介</label>
      <div class="col-sm-10">
        <input class="form-control" name="wxinfo" value="{$info.wxinfo}" type="text" placeholder="活动简介">
      </div>
   </div>
<div class="form-group">
      <label class="col-sm-2 control-label">每人砍价时间</label>
      <div class="col-sm-10">
        <input type="number" class="form-control" id="starttime" value="{$info.starttime}" name="starttime" style="width:100px">&nbsp;单位（小时） 
      </div>
   </div>
      <div class="form-group">
      <label class="col-sm-2 control-label">商品原价</label>
      <div class="col-sm-10">
      
      <input type="number" class="form-control" id="original" value="{$info.original}" name="original" style="width:100px">&nbsp;原价不能低于底价，单位（元）
      
         
      </div>
   </div>
      
      <div class="form-group">
      <label class="col-sm-2 control-label">商品底价</label>
      <div class="col-sm-10">
         
         
         
         <input type="number" class="form-control" id="minimum" value="{$info.minimum}" name="minimum" style="width:100px">&nbsp;底价不能高于原价，单位（元）
      </div>
   </div>
   
   
<div class="form-group">
      <label class="col-sm-2 control-label">砍价力度</label>
      <div class="col-sm-10">
      
      
    共&nbsp;<input type="number" class="form-control" id="dao" value="{$info.dao}" name="dao" style="width:100px; display:inline;">&nbsp;刀砍至底价&nbsp;&nbsp;（注：总刀数要大于前N刀的刀数）
      
      
       前 <input type="number" class="form-control" id="qdao" value="{$info.qdao}" name="qdao" style="width:100px; display:inline;">&nbsp;刀，砍掉&nbsp;<input type="number" class="form-control" id="qprice" value="{$info.qprice}" name="qprice" style="width:100px; display:inline;">&nbsp;元
      </div>
   </div> 


   <div class="form-group">
      <label class="col-sm-2 control-label">库存(数字)</label>
      <div class="col-sm-10">
      
      
    <input type="number" class="form-control" id="inventory" value="{$info.inventory}" name="inventory" style="width:100px">
      </div>
   </div> 
      
      
      
      
      
      
      
      
      <div class="form-group">
      <label class="col-sm-2 control-label">封面图</label>
      <div class="col-sm-2">
         <input name="logoimg1" type="hidden" value="{$info.logoimg1}" /><img onclick="showImgBox(this);" src="<notempty name="info['logoimg1']">{:getThumbPath($info['logoimg1'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="logoimg1" height="40" />
      </div>
      
      <div class="col-sm-2">
         <input name="logoimg2" type="hidden" value="{$info.logoimg2}" /><img onclick="showImgBox(this);" src="<notempty name="info['logoimg2']">{:getThumbPath($info['logoimg2'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="logoimg2" height="40" />
      </div>
      
      
      <div class="col-sm-2">
         <input name="logoimg3" type="hidden" value="{$info.logoimg3}" /><img onclick="showImgBox(this);" src="<notempty name="info['logoimg3']">{:getThumbPath($info['logoimg3'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="logoimg3" height="40" />
      </div>
      
      
      
   </div> 
       <div class="form-group">
      <label class="col-sm-2 control-label">关联商品</label>
      <div class="col-sm-10">
      <div id="relateids"><volist name="relatelist" id="vo">
      <gt name="vo" value="0">
      <div class="col-sm-3 col-md-3" style="position:relative;"><div class="thumbnail" id="thumbnail_{$vo.id}">
          <img alt="100%x200" src="{:getThumbPath($vo['img_url'])}" data-holder-rendered="true" style="width: 100%; display: block;">
          <div class="caption">
            <h3 style="font-size:12px;">{$vo['title']}</h3>
            <input type="hidden" name="relateids" value="{$vo.id}">
          </div>
        </div><a style="position:absolute; top:0px; right:10px; display:inline-block; width:30px; height:30px; line-height:30px; text-align:center; background:#f00; color:#fff;" onClick="$(this).parent().remove();" href="##">x</a></div>
      </gt>
      </volist></div>
      
      <a onClick="relateids();" class="btn btn-success">更改</a>
      </div>
   </div>
      
      
      <div class="form-group">
      <label class="col-sm-2 control-label">商品详情</label>
      <div class="col-sm-10">
         <html:editor id="info" name="info" type="UEDIT" style="height:400px; width:100%;">{$info.info}</html:editor>
      </div>
   </div>
      
      <div class="form-group">
      <label class="col-sm-2 control-label">活动规则</label>
      <div class="col-sm-10">
         <html:editor id="guize" name="guize" type="UEDIT" style="height:400px; width:100%;">{$info.guize}</html:editor>
      </div>
   </div>
      
      
      
      
      
 
        
      </div><div class="pages"><button type="submit" class="btn btn-success">保存</button></div>
    </form>
  </div>
  <div class="clear"></div>
</div>

</body></html>